<!-- 使用 type="home" 属性设置首页 -->
<route lang="json">
{
  "style": { "navigationBarTitleText": "首页" },
  "name": "my"
}
</route>

<template>
  <view>
    <uv-button @click="goHome" text="返回首页"></uv-button>
  </view>
</template>

<script setup lang="ts">
const router = useRouter();
const goHome = () => {
  router.push({ name: 'home' });
};
</script>
